<?php

/**
 * @author Martin Pernica
 * @copyright 2008
 */

function getListOfComponents($without_prefix = FALSE, $dir = "../components/"){
$components = array();
$handle = opendir($dir);
for ($i = 0; ($file = readdir($handle)) !== false; $i++){
        if($without_prefix){
        if($components[$i] != "." && $components[$i] != ".." && $components[$i] != ".svn"){
		$file = explode("_", $file);
        $components[$i] = $file[1];
        }
	}else{
    if($components[$i] != "." && $components[$i] != ".." && $components[$i] != ".svn"){
        $components[$i] = $file;
        }
        }
}
closedir($handle);

return $components;

}
?>